package com.alibaba.algo.controller;

import com.alibaba.algo.service.AlarmService;
import com.alibaba.algo.vo.AlarmRequestVO;
import com.alibaba.algo.vo.AlarmResponseVO;
import com.alibaba.algo.core.base.PagerEntity;
import com.alibaba.algo.core.resp.BaseResult;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 告警任务控制层
 * @author: malin
 * @date: 2020-11-25 13:57:33
 */
@Slf4j
@RestController
@RequestMapping(value = "/alarm")
public class AlarmController {
	@Resource
	private AlarmService alarmService;

	/**
	 * @Description: 分页获取告警任务列表
	 * @author: malin
	 * @date: 2020-11-25 14:00:46
	 */
	@PostMapping("/getListByPager")
	public BaseResult getListByPager(@RequestBody AlarmRequestVO alarmRequestVO) {
		PagerEntity pagerEntity = alarmService.pageByPara(alarmRequestVO);
		return BaseResult.buildSuccess(pagerEntity);
	}


}
